:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --text-color: #2c3e50;
    --border-color: #e0e0e0;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --input-background: #f8fafc;
    --placeholder-color: #a0aec0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-wrapper {
    min-height: 100vh;
    padding: 1rem 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.form-card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--placeholder-color);
    font-size: 0.5rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-color);
}

.required {
    color: var(--error-color);
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select, textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--input-background);
    color: var(--text-color);
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--placeholder-color);
    pointer-events: none;
    font-size: 0.8rem;
}

.validation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-actions {
    margin-top: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    display: block;
}

/* 上传相关样式 */
.upload-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    text-align: center;
    background: var(--input-background);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(33, 150, 243, 0.05);
}

.upload-icon {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.upload-text {
    color: var(--placeholder-color);
    margin-bottom: 0.25rem;
    font-weight: 300;
}

.upload-hint {
    font-size: 0.5rem;
    color: var(--placeholder-color);
}

.file-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--input-background);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-info {
    flex: 1;
}

.preview-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.preview-size {
    font-size: 0.5rem;
    color: var(--placeholder-color);
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.2rem;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5rem;
        border-radius: 8px;
    }

    .container {
        padding: 0 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* 动画效果 */
.animated-form .form-group {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.animated-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.animated-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.animated-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.animated-form .form-group:nth-child(5) { animation-delay: 0.5s; }